package com.scy.java.base;

import java.util.Scanner;

//键盘录入
public class ScannerDemo {
    public static void main(String[] args) {
//        创建键盘录入对象
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个数字");
        int nextInt = scanner.nextInt();
        System.out.println("请输入一个字符串");
        String line = scanner.next();
        System.out.println("数字为："+nextInt+"\n"+"字符串为："+line);

    }
}
